package sk.hackcraft.util.simulation;

public class ControlItem
{
	private boolean paused;
	private boolean stopped;

	private SimulationController controller;

	public ControlItem()
	{
		this.paused = false;
		this.stopped = false;
	}
	
	public void setController(SimulationController controller)
	{
		this.controller = controller;
		updateState();
	}

	public void updateState()
	{
		if(controller != null)
		{
			this.paused = controller.isPaused();
			this.stopped = controller.isStopped();
		}
	}

	public boolean isPaused()
	{
		return paused;
	}

	public boolean isStopped()
	{
		return stopped;
	}
}